#include<bits/stdc++.h>
using namespace std;
#define fi first
#define se second
#define ll long long
#define ull unsigned long long
#define ld long double
#define pii pair<int,int>
#define pll pair<ll,ll>
#define mod1 998244353
#define mod2 1000000007
#define pb push_back
#define ppb pop_back
#define FILENAME "duel"
inline ll read(){
    ll x=0,f=1;
    char ch=getchar();
    while(ch>'9'||ch<'0'){
        if(ch=='-')f=-1;
        ch=getchar();
    }
    while(ch>='0'&&ch<='9'){
        x=(x<<1)+(x<<3)+(ch^48);
        ch=getchar();
    }
    return x*f;
}
void print(ll x){
    if(x<0){
        putchar('-');
        x=-x;
    }
    if(x>9)print(x/10);
    putchar(x%10+'0');
}
ll fac[100005],inv[100005],mod=mod1;
ll gcd(ll a,ll b){return !b?a:gcd(b,a%b);}
ll lcm(ll a,ll b){return a/gcd(a,b)*b;}
ll fastpow(ll base,ll p){
    if(p==0)return 1ll;
    if(p==1)return base;
    if(p%2)return fastpow(base*base%mod,p/2)*base%mod;
    else return fastpow(base*base%mod,p/2);
}
void init(ll n){
    fac[0]=inv[0]=1;
    for(int i=1;i<=n;i++)fac[i]=fac[i-1]*i%mod;
    inv[n]=fastpow(fac[n],mod-2);
    for(int i=n-1;i>=1;i--)inv[i]=inv[i+1]*(i+1)%mod;
}
ll C(ll n,ll m){return fac[n]*inv[m]%mod*inv[n-m]%mod;}

ll fa[100005];
ll find(ll x){return fa[x]==x?x:fa[x]=find(fa[x]);}
void unite(ll x,ll y){fa[find(x)]=find(y);}

ll lowbit(ll x){return x&-x;}
ll n,ans,lft,r[100005],cnt[100005];
int main(){
    freopen(FILENAME ".in","r",stdin);
    freopen(FILENAME ".out","w",stdout);
    cin>>n;
    for(int i=1;i<=n;i++)cin>>r[i];
    for(int i=1;i<=100000;i++)cnt[r[i]]++;
    for(int i=1;i<=100000;i++){
        if(cnt[i]){
            if(cnt[i]>=lft)lft=0;
            else lft-=cnt[i];
            lft+=cnt[i];
        }
    }
    cout<<lft<<endl;
    return 0;
}